home *** CD-ROM | disk | FTP | other *** search
- From pgoujard@infocom.co.uk Wed Aug 11 23:32:49 1993
- Path: uunet!cs.utexas.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!uknet!infocom.co.uk!pgoujard
- From: pgoujard@infocom.co.uk (Philippe Goujard)
- Newsgroups: alt.sources
- Subject: SLNR v1.2.c an offline newsreader 3/3
- Message-ID: <21530@infocom.co.uk>
- Date: 12 Aug 93 00:24:15 GMT
- Organization: INFOCOM Public Access Unix, (ModemLine) +44 [0] 734 340055
- Lines: 531
- X-Newsreader: TIN [version 1.1 PL9]
- Xref: uunet alt.sources:9102
-
-
-
- #!/bin/sh
- # this is slnr.sh.03 (part 3 of a multipart archive)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file slnr/slnr.doc continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 3; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test ! -f _shar_wnt_.tmp; then
- echo 'x - still skipping slnr/slnr.doc'
- else
- echo 'x - continuing file slnr/slnr.doc'
- sed 's/^X//' << 'SHAR_EOF' >> 'slnr/slnr.doc' &&
- X available if you are in the last page of the list. Note that this
- X command is case sensitive.
- X
- X - Next_grp: Moves to the next newsgroup. Newsgroups are sorted
- X alphabetically so you will find all the "comp" together etc...
- X After reaching the last newsgroup Next_grp goes back to the first one.
- X
- X - Prev_grp: Moves to the previous group.
- X
- X - Save: Saves an article into a file.
- X
- X - Hlp : Displays a page with the list of commands
- X
- X A : redisplays the same page
- X n : Display next page
- X p : Display previous page
- X N or > : Go to next Newsgroup
- X P or < : Go to previous Newsgroup
- X v : View an article
- X V : View an article with the full header
- X M : Send a new mail or Reply to an article by mail
- X W : Write an article or a follow-up to an article
- X SPACE : Display the next article
- X s : Save an article to a filename
- X S : Save an article without the header
- X ! : Execute a shell command
- X Q : Quit
- X
- X
- X - Quit : If you had written reply by mail or new messages to be
- X posted, the quit command first compresses the "mail.rep" and
- X "articles.rep" files into the reply packet.
- X
- X There are 3 commands that are not on the menu because they are another
- X way of displaying messages :
- X
- X ">" : This is the equivalent of the "N" key for Next_grp.
- X
- X "<" : This is the equivalent of the "P" key for Prev_Grp.
- X
- X SPACE : If you use the color version (ANSI=yes) you may have noticed
- X that the number of the message you have just read is of a different
- X color. This is your "message pointer". Pressing space displays you the
- X next message and moves your pointer forward.
- X
- X
- 3) Posting a message
- ~~~~~~~~~~~~~~~~~~~~
- X You can only post a message from a "usenet" group: not if you are
- X reading your private mail.
- X
- X When you press the "W" key to write message that will be posted on the
- X net you are then asked:
- X
- X New article or Follow-up:
- X
- X If you choose "F" your are asked:
- X
- X "Follow-up to No> xx" where xx is the number of the last article you've
- X read. Type the article numbe or press return to accept the default
- X value.
- X
- X You are then asked for a subject, and if you are posting a follow-up to
- X an existing article, SLNR proposes you a subject (eventually adding
- X "Re:" in front for a reply).
- X
- X The editor you have defined in your slnr.ini file is then called, and if
- X you are writing a follow-up, the text of the message you are replying to
- X is "quoted" (using the quote string you defined in slnr.ini) and the
- X line: "john.doe@foobar.country (John Doe) wrote" (where john doe is the
- X author of the original message) is added at the top.
- X
- X WARNING: If you did not define an editor or defined it incorrectly, SLNR
- X might come with an error "file not found", according to your operating
- X system.
- X
- X Once you saved and exited the editor you are presented with the
- X following options:
- X "Post, Edit_file, Header_edit or Abandon".
- X
- X - Post: saves the message into a Rxxx.MSG file (one of the replies file
- X to be uploaded) and returns you to the list of article.
- X
- X - Edit file: Call again the editor with the file you just saved.
- X
- X - Header_edit: Allows you to change the subject, the newsgroup or to add
- X some fields in the header. See section "Message Header".
- X
- X - Abandon returns to the list of articles, without posting your
- X message.
- X
- X
- X
- 4) Mailing a message
- ~~~~~~~~~~~~~~~~~~~~
- X You use this option when you want to send a private mail to someone,
- X either a new person or the author of a message you have just read.
- X
- X You are asked if it is a "New message or Response".
- X
- X In case of a response, like for posting a message you are asked to which
- X message and proposed with the number of the message you have just read.
- X Again, you are asked for a subject and proposed a default one.
- X
- X Then the editor is invoked, and if you are responding to a message, the
- X text of the message is quoted and the text "In newsgroup.so.and.so you
- X wrote:" is inserted at the top of the message.
- X
- X Once you've saved and exited the editor you are presented with the same
- X options as when posting a message: Post, Edit_file, Header_edit or
- X Abandon.
- X
- X
- X
- X
- 5) Message Header
- ~~~~~~~~~~~~~~~~~
- X You must know that every message (both usenet news and electronic mail)
- X are in two parts: the message body, which you read and write and the
- X message header, which contains administrative information.
- X
- X Usually headers are quite huge and are not very interesting for the
- X end-user this is why be default they are not presented to you. However
- X there is a case when you need at least a minimal header: when you want to
- X post a message, you have to specify the email address of the person you
- X are writing to or the newsgroup in case of a public message.
- X
- X A header is a text information that will be processed by the message
- X posting program to send it trough the network. You can edit it, add extra
- X fields of modify the current ones, but if you do so BE CAREFUL!!!
- X
- X Headers are processed by machines and they require a relatively strict
- X syntax, for example if you write "Subject :" instead of "Subject:" this
- X is illegal and most machines will not recognise your field.
- X Your are not allowed to use 8-bits characters in a header (accents or
- X graphic characters), you are not allowed to have a blank line in the
- X header, everything after the blank line will be counted as part of the
- X body.
- X
- X There are well-known documents which defines what you can have in a
- X electronic mail header and in a usenet news header, they are respectively
- X RFC822 and RFC1036, those documents are intended more for the
- X administrator and the programmer than for the end-user.
- X
- X Another good way to understand about headers is to look at some messages
- X and try to find how they are constructed.
- X
- X
- X
- Appendix A: Limitations
- ~~~~~~~~~~~~~~~~~~~~~~~
- X - The unix version is limited to 5000 articles in up to 1000 groups,
- X the Atari one is limited to 1000 articles in up to 200 groups and the
- X DOS version is limited to 500 articles in up to 100 groups.
- X
- X - The unix version is mostly supported so you can try it out once you
- X have installed "getnews" and "postreply" on your unix machine, but if
- X you want to read the news on the unix machine you might consider better
- X newsreaders such as tin, nn, vn, trn etc...
- X
- Appendix B: Default values
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
- X - In the Unix version :
- X - PAGER = simplpg
- X - EDITOR = simpled
- X - COMPRESS = zip
- X
- X - In the DOS version
- X - PAGER = more
- X - EDITOR = qedit
- X - COMPRESS = pkzip
- X
- X - In the ATARI version
- X - PAGER =
- X - EDITOR =
- X - COMPRESS = stzip
- SHAR_EOF
- echo 'File slnr/slnr.doc is complete' &&
- chmod 0440 slnr/slnr.doc ||
- echo 'restore of slnr/slnr.doc failed'
- Wc_c="`wc -c < 'slnr/slnr.doc'`"
- test 17155 -eq "$Wc_c" ||
- echo 'slnr/slnr.doc: original size 17155, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= slnr/slnr.ini ==============
- if test -f 'slnr/slnr.ini' -a X"$1" != X"-c"; then
- echo 'x - skipping slnr/slnr.ini (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting slnr/slnr.ini (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'slnr/slnr.ini' &&
- # This is the SLNR config file
- X
- # Each line starting with a hash is a comment
- X
- # The config file is not necessary, if not found SLNR will use the
- # defaults values.
- X
- # EDITOR=
- # PAGER=
- X
- COMPRESS=zip
- X
- # Un-comment the following if you don't want ansi color codes
- # ANSI=No
- SHAR_EOF
- chmod 0440 slnr/slnr.ini ||
- echo 'restore of slnr/slnr.ini failed'
- Wc_c="`wc -c < 'slnr/slnr.ini'`"
- test 273 -eq "$Wc_c" ||
- echo 'slnr/slnr.ini: original size 273, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= slnr/getnews.doc ==============
- if test -f 'slnr/getnews.doc' -a X"$1" != X"-c"; then
- echo 'x - skipping slnr/getnews.doc (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting slnr/getnews.doc (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'slnr/getnews.doc' &&
- This documentation give some hints on how to compile/change the files
- getnews.c and postreply.c.
- X
- 0) What is getnews.c
- ~~~~~~~~~~~~~~~~~~~~
- X In case you haven't figure yet, getnews is the program that get the
- X unread news articles and the mail and store them in a SLNP packet.
- X To compile and install getnews on your unix machine you need to have a
- X little knowledge of :
- X - Where the news are located and fed to your machine.
- X - What compression programs are available
- X - How to create/modify a text file
- X
- X Getnews does not require to be installed or configured by your system
- X administrator (But once you've compiled it you sysadmin might want to
- X place it in /usr/local/bin or equivalent).
- X
- X
- 1) Compiling getnews.c
- ~~~~~~~~~~~~~~~~~~~~~~
- X
- No executables ?
- X Since getnews and postreply are supposed to run on a unix machine they
- X are provided in source (because you may have to modify the code and of
- X course for security reasons).
- X When Unix systems without a C compiler become more popular (shock,
- X horror!) and when the program will be a little bit more stable, I may
- X provide executables for the most common architectures (SCO, Sparc
- X etc...)
- X
- Ansi compiler
- X Since many users had problem because they could not compile with their
- X non-ansi compiler, I think I have removed all ansi stuff. However if
- X you have a non-ansi compiler I strongly suggest you get a new one :
- X more and more sources will be posted in ansi C
- X
- X
- #defines and #ifdef
- X The best way to understand what those #defines do and which one to
- X choose is to look at the code, it is relatively well documented.
- X As a rule of thumb : #defines are system-wide information (like the
- X spool directory, the name of the newsgroups file etc...) while
- X everything that can be modified by the user is in the config file.
- X
- 3) The config file
- ~~~~~~~~~~~~~~~~~~
- X The file $HOME/.getnewsrc is a configuration file for getnews.
- X Although it is not mandatory, you can use it to configure properly
- X getnews without having to recompile.
- X The config file is a text file where the lines have the following
- X format : (not case sensitive)
- X FIELD_NAME=VALUE
- X
- X Where FIELD_NAME is one of the following :
- X
- X Field : MSGMAX
- X Value : Integer
- X Default: 0
- X Comment: This is the maximum number of messages allowed in a packet,
- X if set to 0 it is unlimited.
- X
- X Field : GRPMAX
- X Value : Integer
- X Default: 0
- X Comment: This is the maximum number of newsgroups allowed in a packet,
- X if set to 0 it is unlimited
- X
- X Field : MMDF
- X Value : SET or UNSET
- X Default: UNSET
- X Comment: If SET, getnews assumes that the mailbox is in the MMDF
- X format (i.e each message is separated by 4 Ctrl A's)
- X
- X Field : USENET_ONLY (not used in this version)
- X Value : SET or UNSET
- X Default: UNSET
- X Comment: If SET, put all mail and news messages in the usenet batch
- X format (with the "#! rnews" header)
- X
- X Field : MAIL_ONLY (not used in this version)
- X Value : SET or UNSET
- X Default: UNSET
- X Comment: If SET, put all mail and news messages in the mail format
- X (either unix mail or MMDF format according to the MMDF field)
- X
- X Field : DELETE_MAILBOX
- X Value : SET or UNSET
- X Default: UNSET
- X Comment: If SET, the mailbox will be deleted when the messages have
- X been written in the packet. If UNSET the mailbox will be saved into
- X the $HOME/.oldmail file before being deleted.
- X
- X Field : MARK_READ
- X Value : SET, UNSET or ASK
- X Default: ASK
- X Comment: This field tells if saved article should be marked as read in
- X the .newsrc. If UNSET the .newsrc will be left untouched, if SET the
- X .newsrc will be updated and if ASK the question will be asked before
- X performing the task.
- X If it is SET or if "y" is answered when the question is asked, a copy
- X of the file .newsrc is created under the name .newsrc.bak
- X
- X Field : GET_MAIL
- X Value : SET, UNSET or ASK
- X Default: ASK
- X Comment: This field tells if mail messages should be added to the
- X packet. If SET the mail will be added, if ASK the question will be
- X asqued before performing the task.
- X
- X Field : COMPRESS
- X Value : String
- X Default: /usr/local/bin/zip
- X Comment: This string points to the utility which will be executed to
- X pack all .MSG files and to compress the packet. This utility MUST
- X accept at least two arguments. The first argument being the name of
- X the output file containing the compressed messages and the second and
- X other arguments are the list of files to be compressed.
- X In the case of utilities like "arc" or "tar" which need extra
- X arguments, COMPRESS shall point to a shell script.
- X For example "arc -a $*" or "tar -cf $*"
- X The string can contain shell variables that will be expanded
- X (e.g $HOME/bin/zip )
- X
- X Field : ARCTYPE
- X Value : String
- X Default: zip
- X Comment: This is the "extension" of the file name passed as an
- X argument to the compress program. If you change the COMPRESS program,
- X remember to change the ARCTYPE as well otherwise you might end having
- X an "arc" packet called something.zip.
- X
- X Field : PACKET_NAME
- X Value : String
- X Default: INFONEWS
- X Comment: The name of the file to be created by the compress utility.
- X
- X Field : WORK_DIR
- X Value : String
- X Default: $HOME/News
- X Comment: This is the name of the directory, where all work files
- X and the packet will be created. This has to be either a full pathname
- X (e.g /usr/tmp ) or a pathname with shell variables (e.g $HOME/News )
- X
- X Field : DO_INDEX
- X Value : SET or UNSET
- X Default: SET
- X Comment: If SET, create a 'C' type .IDX file for each .MSG file
- X
- X Field : INDEX_ONLY
- X Value : SET or UNSET
- X Default: UNSET
- X Comment: If SET, only the index files (.IDX) will be created in the
- X packet, not the .MSG files. This is used for remote thread selection.
- X Note : This command can also be activated by using "getnews -i"
- X
- X
- 4) Error messages
- ~~~~~~~~~~~~~~~~~
- X - Warning: undefined compression utility
- X If the default value does not suits your need, add a "COMPRESS" line
- X in the .getnewsrc configuration file.
- X
- X - Error $xxxx not defined : The shell variable xxx (either MAIL or
- X HOME) needs to be defined for getnews to run.
- X For example type:
- X MAIL=/usr/spool/mail/$LOGNAME (or the path of your mailbox)
- X export MAIL
- X And re-run getnews.
- X If you don't know where your mailbox is or don't have a $HOME
- X variable, contact your system administrator.
- X
- X - Unable to create [....] or Unable to open a file [...] or [...]
- X Check the path of the file exists and that you have write permission
- X in the directory. The directory should be you work directory.
- X You can change it in your .getnewsrc config file
- X
- X - File [.newsrc] not found : You do not appear to have a .newsrc file
- X in your home directory. Either your home directory is set wrongly or
- X you have not used Usenet news yet. To create such a file, either ask
- X a copy of somebody else .newsrc and edit it to suit your needs or
- X start a newsreader (like rn,vn,nn,tin..) which will create one for
- X you (warning: this may be long).
- X
- X - Warning char <> unrecognised in .newsrc
- X Your .newsrc contains lines which are not in the format :
- X full.group.name: value,value-value,...,value
- X Either edit your .newsrc or use the option "mark articles as read"
- X which will recreate clean file.
- X
- X - Line <...> has no known keyword.
- X The line of the .getnewsrc config file is not in the format
- X KEYWORD=VALUE
- X or the theyword is unknown.
- X
- X - Error in config file, line <...> should be ....
- X Only one of the above values is accepted for the keyword of this
- X line.
- X
- X - Unable to compress *.MSG and AREAS file
- X The compress program specified (or the default one if none specified)
- X cannot be found. Check the path and modify the entry in the
- X .getnewsrc config file. All MSG files and the AREA file are left
- X intact, you can call the compress program manually.
- X
- X - Compress program returned an error, workfiles not removed
- X The program or shell script pointed by the COMPRESS variable had an
- X exit value different of 0. If it is a shell script make sure it
- X returns 0 if the compression was done correctly.
- X
- SHAR_EOF
- chmod 0440 slnr/getnews.doc ||
- echo 'restore of slnr/getnews.doc failed'
- Wc_c="`wc -c < 'slnr/getnews.doc'`"
- test 8581 -eq "$Wc_c" ||
- echo 'slnr/getnews.doc: original size 8581, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= slnr/a ==============
- if test -f 'slnr/a' -a X"$1" != X"-c"; then
- echo 'x - skipping slnr/a (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting slnr/a (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'slnr/a' &&
- shar: illegal option -- ?
- shar 3.47
- usage: shar [ options ] file ...
- X shar -S [ options ]
- -V produce "vanilla" shars demanding little of the unshar environment
- -v verbose messages OFF while executing
- -m restore file modification dates & times with "touch" commands
- -w don't check with 'wc -c' after unpack
- -a generate Submitted-by: & Archive-name: headers
- -nXXX use XXX as the name of the archive (documentation)
- -s override automatically determined submitter name
- -x overwrite existing files without checking if they already exist
- -X interactively overwrite existing files (NOT FOR NET SHARS)
- -B treat all files as binary, use uuencode
- -T treat all files as text (default)
- -C compress and uuencode all files
- -bXX pass -bXX (default 12) to compress when compressing (implies -C)
- -p allow positional parameter options. The options "-B" and "-T"
- X and "-C" may be embedded, and files to the right of the
- X option will be processed in the specified mode
- -M mixed mode. Determine if the files are text or
- X binary and archive correctly.
- -P use temp files instead of pipes in the shar file
- -F force the prefix character on every line (even if not required)
- -c start the shar with a cut line
- -f restore by filename only, rather than path
- -dXXX use XXX to delimit the files in the shar
- -oXXX (or -o XXX) output to file XXX.01 thru XXX.nn
- -lXX limit output file size to XXk bytes (but don't split files)
- -LXX limit output file size to XXk bytes (may split files)
- -S read files to wrap from stdin, ignoring argument line
- X
- The -S option reads filenames one per line from stdin; input
- format must be similar to 'find' output, except that if -p
- is specified, -B, -T or -C may be used (on lines by themselves)
- e.g., find . -type f -print | sort | shar -C -l50 -o /tmp/big
- X
- The 'o' option is required if the 'l' or 'L' option is used
- The 'n' option is required if the 'a' option is used
- X
- -a generates sharname/part## headers. If the -a argument contains
- a '/', then /part is not appended
- The automatic submitter name is trivial: essentially `whoami`@`uname`
- SHAR_EOF
- chmod 0660 slnr/a ||
- echo 'restore of slnr/a failed'
- Wc_c="`wc -c < 'slnr/a'`"
- test 2093 -eq "$Wc_c" ||
- echo 'slnr/a: original size 2093, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- rm -f _shar_seq_.tmp
- echo You have unpacked the last part
- exit 0
-
- --
- Philippe Goujard <Sysop> Email : pgoujard@infocom.co.uk
- INFOCOM : FREE (yes free!) Usenet access in the UK - (0734) 34 00 55
- For more information mail "info@infocom.co.uk" a daemon will autoreply
-
-